Mercurial > gftp.yaz
comparison lib/misc.c @ 66:cd3e457cbc85
2002-11-26 Brian Masney <masneyb@gftp.org>
* configure.in - change version to 2.0.14rc1
* lib/local.c - fix for uploading files. Move setting of hostname
from local_connect() to local_init()
* lib/misc.c (gftp_request) - copy only select fields over instead of
whole structure
* lib/protocols.c (gftp_request_new) - set datafd and cachefd to -1
* lib/protocols.c (gftp_set_proxy_config) - allow a NULL proxy_config
to be passed
* src/gtk/misc-gtk.c (update_window) - don't show the hostname if we
are connected via the local protocol
* src/gtk/transfer.c (create_transfer) - check to see if this protocol
is always connected
author | masneyb |
---|---|
date | Wed, 27 Nov 2002 02:23:51 +0000 |
parents | 4b5fec7711e9 |
children | aa971a4bb16f |
comparison
equal
deleted
inserted
replaced
65:4b5fec7711e9 | 66:cd3e457cbc85 |
---|---|
567 gftp_request * | 567 gftp_request * |
568 copy_request (gftp_request * req) | 568 copy_request (gftp_request * req) |
569 { | 569 { |
570 gftp_request * newreq; | 570 gftp_request * newreq; |
571 | 571 |
572 newreq = g_malloc0 (sizeof (*newreq)); | 572 newreq = gftp_request_new (); |
573 memcpy (newreq, req, sizeof (*newreq)); | |
574 | 573 |
575 if (req->hostname) | 574 if (req->hostname) |
576 newreq->hostname = g_strdup (req->hostname); | 575 newreq->hostname = g_strdup (req->hostname); |
577 if (req->username) | 576 if (req->username) |
578 newreq->username = g_strdup (req->username); | 577 newreq->username = g_strdup (req->username); |
580 newreq->password = g_strdup (req->password); | 579 newreq->password = g_strdup (req->password); |
581 if (req->account) | 580 if (req->account) |
582 newreq->account = g_strdup (req->account); | 581 newreq->account = g_strdup (req->account); |
583 if (req->directory) | 582 if (req->directory) |
584 newreq->directory = g_strdup (req->directory); | 583 newreq->directory = g_strdup (req->directory); |
585 | 584 newreq->port = req->port; |
586 newreq->url_prefix = NULL; | 585 newreq->data_type = req->data_type; |
587 newreq->protocol_name = NULL; | 586 newreq->use_proxy = req->use_proxy; |
588 newreq->sftpserv_path = NULL; | 587 gftp_set_proxy_config (newreq, req->proxy_config); |
589 newreq->proxy_config = NULL; | 588 newreq->transfer_type = req->transfer_type; |
590 newreq->proxy_hostname = NULL; | 589 newreq->network_timeout = req->network_timeout; |
591 newreq->proxy_username = NULL; | 590 newreq->retries = req->retries; |
592 newreq->proxy_password = NULL; | 591 newreq->sleep_time = req->sleep_time; |
593 newreq->proxy_account = NULL; | 592 newreq->passive_transfer = req->passive_transfer; |
594 newreq->last_ftp_response = NULL; | 593 newreq->maxkbs = req->maxkbs; |
595 newreq->last_dir_entry = NULL; | 594 newreq->logging_function = req->logging_function; |
596 newreq->sockfd = -1; | 595 |
597 newreq->datafd = -1; | 596 if (req->sftpserv_path != NULL) |
598 newreq->cachefd = -1; | 597 newreq->sftpserv_path = g_strdup (req->sftpserv_path); |
599 newreq->hostp = NULL; | |
600 | |
601 if (req->proxy_config != NULL) | |
602 newreq->proxy_config = g_strdup (req->proxy_config); | |
603 | 598 |
604 req->init (newreq); | 599 req->init (newreq); |
605 | 600 |
606 return (newreq); | 601 return (newreq); |
607 } | 602 } |