Lines 68-74
Link Here
|
68 |
afp_getsessiontoken_reply,afp_blank_reply, NULL, NULL, |
68 |
afp_getsessiontoken_reply,afp_blank_reply, NULL, NULL, |
69 |
afp_enumerateext2_reply, NULL, NULL, NULL, /*64 - 71 */ |
69 |
afp_enumerateext2_reply, NULL, NULL, NULL, /*64 - 71 */ |
70 |
afp_listextattrs_reply, NULL, NULL, NULL, |
70 |
afp_listextattrs_reply, NULL, NULL, NULL, |
71 |
afp_blank_reply, NULL, NULL, NULL, /*72 - 79 */ |
71 |
afp_blank_reply, NULL, afp_blank_reply, afp_blank_reply, /*72 - 79 */ |
72 |
|
72 |
|
73 |
NULL, NULL, NULL, NULL, |
73 |
NULL, NULL, NULL, NULL, |
74 |
NULL, NULL, NULL, NULL, |
74 |
NULL, NULL, NULL, NULL, |
Lines 320-327
Link Here
|
320 |
|
320 |
|
321 |
struct dsi_request * p; |
321 |
struct dsi_request * p; |
322 |
struct afp_server *s2; |
322 |
struct afp_server *s2; |
|
|
323 |
|
324 |
|
325 |
if (s==NULL) |
326 |
goto out; |
327 |
|
323 |
for (p=s->command_requests;p;p=p->next) { |
328 |
for (p=s->command_requests;p;p=p->next) { |
324 |
pthread_cond_signal(&p->condition_cond); |
329 |
pthread_mutex_lock(&p->waiting_mutex); |
|
|
330 |
p->done_waiting=1; |
331 |
pthread_cond_signal(&p->waiting_cond); |
332 |
pthread_mutex_unlock(&p->waiting_mutex); |
325 |
} |
333 |
} |
326 |
|
334 |
|
327 |
if (s==server_base) { |
335 |
if (s==server_base) { |
Lines 354-360
Link Here
|
354 |
s->exit_flag = 0; |
362 |
s->exit_flag = 0; |
355 |
s->path_encoding=kFPUTF8Name; /* This is a default */ |
363 |
s->path_encoding=kFPUTF8Name; /* This is a default */ |
356 |
s->next=NULL; |
364 |
s->next=NULL; |
357 |
s->bufsize=2048; |
365 |
s->bufsize=4096; |
358 |
s->incoming_buffer=malloc(s->bufsize); |
366 |
s->incoming_buffer=malloc(s->bufsize); |
359 |
|
367 |
|
360 |
s->attention_quantum=AFP_DEFAULT_ATTENTION_QUANTUM; |
368 |
s->attention_quantum=AFP_DEFAULT_ATTENTION_QUANTUM; |
Lines 524-536
Link Here
|
524 |
kFPVolCreateDateBit|kFPVolIDBit | |
532 |
kFPVolCreateDateBit|kFPVolIDBit | |
525 |
kFPVolNameBit; |
533 |
kFPVolNameBit; |
526 |
char new_encoding; |
534 |
char new_encoding; |
|
|
535 |
int ret; |
527 |
|
536 |
|
528 |
if (server->using_version->av_number>=30) |
537 |
if (server->using_version->av_number>=30) |
529 |
bitmap|= kFPVolNameBit|kFPVolBlockSizeBit; |
538 |
bitmap|= kFPVolNameBit|kFPVolBlockSizeBit; |
530 |
|
539 |
|
531 |
switch (afp_volopen(volume,bitmap, |
540 |
ret = afp_volopen(volume,bitmap, |
532 |
(strlen(volume->volpassword)>0) ? volume->volpassword : NULL)) |
541 |
(strlen(volume->volpassword)>0) ? volume->volpassword : NULL); |
533 |
{ |
542 |
switch(ret){ |
534 |
case kFPAccessDenied: |
543 |
case kFPAccessDenied: |
535 |
*l+=snprintf(mesg,max-*l, |
544 |
*l+=snprintf(mesg,max-*l, |
536 |
"Incorrect volume password\n"); |
545 |
"Incorrect volume password\n"); |
Lines 544-549
Link Here
|
544 |
*l+=snprintf(mesg,max-*l, |
553 |
*l+=snprintf(mesg,max-*l, |
545 |
"Could not open volume\n"); |
554 |
"Could not open volume\n"); |
546 |
goto error; |
555 |
goto error; |
|
|
556 |
case ETIMEDOUT: |
557 |
*l+=snprintf(mesg,max-*l, |
558 |
"Timed out waiting to open volume\n"); |
559 |
goto error; |
547 |
} |
560 |
} |
548 |
|
561 |
|
549 |
/* It is said that if a volume's encoding will be the same |
562 |
/* It is said that if a volume's encoding will be the same |
Lines 641-647
Link Here
|
641 |
add_server(server); |
654 |
add_server(server); |
642 |
|
655 |
|
643 |
add_fd_and_signal(server->fd); |
656 |
add_fd_and_signal(server->fd); |
644 |
|
|
|
645 |
if (!full) { |
657 |
if (!full) { |
646 |
return 0; |
658 |
return 0; |
647 |
} |
659 |
} |
Lines 649-658
Link Here
|
649 |
/* Get the status, and calculate the transmit time. We use this to |
661 |
/* Get the status, and calculate the transmit time. We use this to |
650 |
* calculate our rx quantum. */ |
662 |
* calculate our rx quantum. */ |
651 |
gettimeofday(&t1,NULL); |
663 |
gettimeofday(&t1,NULL); |
|
|
664 |
|
652 |
if ((error=dsi_getstatus(server))!=0) |
665 |
if ((error=dsi_getstatus(server))!=0) |
653 |
goto error; |
666 |
goto error; |
654 |
gettimeofday(&t2,NULL); |
667 |
gettimeofday(&t2,NULL); |
655 |
|
668 |
|
|
|
669 |
afp_server_identify(server); |
670 |
|
656 |
if ((t2.tv_sec - t1.tv_sec) > 0) |
671 |
if ((t2.tv_sec - t1.tv_sec) > 0) |
657 |
server->tx_delay= (t2.tv_sec - t1.tv_sec) * 1000; |
672 |
server->tx_delay= (t2.tv_sec - t1.tv_sec) * 1000; |
658 |
else |
673 |
else |