From 8cf2a498712b51230c6f0714c3c42b93d0626399 Mon Sep 17 00:00:00 2001 From: "spence%netscape.com" Date: Thu, 8 Apr 1999 07:37:37 +0000 Subject: [PATCH] async dialog work for ftp; generalized async interface --- network/cache/mkmemcac.c | 2 + network/main/mkgeturl.c | 24 ++++---- network/main/mkgeturl.h | 2 + network/main/mkutils.c | 3 + network/module/nsStubContext.cpp | 28 +++++++-- network/protocol/about/mkabout.c | 1 + network/protocol/certld/mkcertld.c | 1 + network/protocol/dataurl/mkdaturl.c | 1 + network/protocol/file/mkfile.c | 1 + network/protocol/ftp/mkftp.c | 81 +++++++++++++++++++------- network/protocol/gopher/mkgopher.c | 1 + network/protocol/http/mkhttp.c | 14 ++++- network/protocol/imap4/mkimap4.cpp | 1 + network/protocol/js/mkmocha.c | 1 + network/protocol/ldap/mkldap.cpp | 1 + network/protocol/mailbox/mkmailbx.c | 2 + network/protocol/pop3/mkpop3.c | 2 + network/protocol/remote/mkremote.c | 1 + network/protocol/smtp/mksmtp.c | 1 + network/protocol/sockstub/sockstub.cpp | 1 + 20 files changed, 128 insertions(+), 41 deletions(-) diff --git a/network/cache/mkmemcac.c b/network/cache/mkmemcac.c index 0ca4bd4e12b..9e5211ab661 100644 --- a/network/cache/mkmemcac.c +++ b/network/cache/mkmemcac.c @@ -2045,6 +2045,7 @@ NET_InitMemCacProtocol(void) /* no prototype when NU_CACHE */ mem_cac_proto_impl.init = net_MemoryCacheLoad; mem_cac_proto_impl.process = net_ProcessMemoryCache; mem_cac_proto_impl.interrupt = net_InterruptMemoryCache; + mem_cac_proto_impl.resume = NULL; mem_cac_proto_impl.cleanup = net_CleanupMemoryCacheProtocol; NET_RegisterProtocolImplementation(&mem_cac_proto_impl, MEMORY_CACHE_TYPE_URL); @@ -2310,6 +2311,7 @@ NET_InitNuCacheProtocol(void) nu_cache_proto_impl.init = net_NuCacheLoad; nu_cache_proto_impl.process = net_ProcessNuCache; nu_cache_proto_impl.interrupt = net_InterruptNuCache; + nu_cache_proto_impl.resume = NULL; nu_cache_proto_impl.cleanup = net_CleanupNuCacheProtocol; NET_RegisterProtocolImplementation(&nu_cache_proto_impl, NU_CACHE_TYPE_URL); diff --git a/network/main/mkgeturl.c b/network/main/mkgeturl.c index e6e822487dc..7736fd4e252 100644 --- a/network/main/mkgeturl.c +++ b/network/main/mkgeturl.c @@ -3143,10 +3143,6 @@ redo_load_switch: /* come here on file/ftp retry */ #endif } -/* forward declaration */ -PUBLIC void NET_ResumeHTTP (ActiveEntry *, PRBool); - - /* this thing is a hack that will allow http streams waiting on passwd auth to resume XXX */ PUBLIC void NET_ResumeWithAuth (void *closure) @@ -3162,27 +3158,27 @@ PUBLIC void NET_ResumeWithAuth (void *closure) } iter = net_EntryList; - while (tmpEntry = (ActiveEntry *) XP_ListNextObject(iter)) { + while ((tmpEntry = (ActiveEntry *) XP_ListNextObject(iter))) { if (tmpEntry == (ActiveEntry *) auth_closure->_private) { break; - } else { - return; } } + if (!tmpEntry) + return; + if (auth_closure && auth_closure->pass && *auth_closure->pass) { TRACEMSG (("NET_ResumeWithAuth: auth succeeded: %s", tmpEntry->URL_s->address)); - /* now update the user/pass */ - tmpEntry->URL_s->username = PL_strdup (auth_closure->user); - tmpEntry->URL_s->password = PL_strdup (auth_closure->pass); /* now try it again */ - NET_ResumeHTTP(tmpEntry, PR_TRUE); + if (tmpEntry->proto_impl->resume) + tmpEntry->proto_impl->resume (tmpEntry, auth_closure, PR_TRUE); } else { TRACEMSG (("NET_ResumeWithAuth(): auth failed: %s", tmpEntry->URL_s->address)); - NET_ResumeHTTP(tmpEntry, PR_FALSE); + if (tmpEntry->proto_impl->resume) + tmpEntry->proto_impl->resume (tmpEntry, auth_closure, PR_FALSE); } /* now free the closure struct */ @@ -4611,6 +4607,7 @@ net_reg_random_protocol(NET_ProtoInitFunc *LoadRoutine, int type) random_proto_impl->init = LoadRoutine; random_proto_impl->process = net_ProtoMainStub; random_proto_impl->interrupt = net_ProtoMainStub; + random_proto_impl->resume = NULL; /* not usually need */ random_proto_impl->cleanup = net_ProtoCleanupStub; NET_RegisterProtocolImplementation(random_proto_impl, type); @@ -5120,7 +5117,7 @@ int32 net_MailtoLoad (ActiveEntry * cur_entry) if(newshost) { char *prefix = "news://"; - char *slash = PL_strrchr (newshost, '/'); + /* char *slash = PL_strrchr (newshost, '/'); -- unused */ HG32828 newspost_url = (char *) PR_Malloc (PL_strlen (prefix) + PL_strlen (newshost) + 10); @@ -5192,6 +5189,7 @@ NET_InitMailtoProtocol(void) mailto_proto_impl.init = net_MailtoLoad; mailto_proto_impl.process = net_MailtoStub; mailto_proto_impl.interrupt = net_MailtoStub; + mailto_proto_impl.resume = NULL; mailto_proto_impl.cleanup = net_CleanupMailtoStub; NET_RegisterProtocolImplementation(&mailto_proto_impl, MAILTO_TYPE_URL); diff --git a/network/main/mkgeturl.h b/network/main/mkgeturl.h index 69b2e09a999..a61db0653dc 100644 --- a/network/main/mkgeturl.h +++ b/network/main/mkgeturl.h @@ -106,6 +106,8 @@ struct _NET_ProtoImpl { int32 (*init) (ActiveEntry *ce); int32 (*process) (ActiveEntry *ce); int32 (*interrupt) (ActiveEntry *ce); + void (*resume) (ActiveEntry *ce, NET_AuthClosure *, PRBool); + /* callback to resume paused streams */ void (*cleanup) (void); /* note that cleanup can be called more * than once, when we need to shut down * connections or free up memory diff --git a/network/main/mkutils.c b/network/main/mkutils.c index ab30ccdbcf4..dc02926c8c4 100644 --- a/network/main/mkutils.c +++ b/network/main/mkutils.c @@ -3338,6 +3338,7 @@ NET_InitURNProtocol(void) urn_proto_impl.init = net_URNProtoLoad; urn_proto_impl.process = net_URNProtoStub; urn_proto_impl.interrupt = net_URNProtoStub; + urn_proto_impl.resume = NULL; urn_proto_impl.cleanup = net_URNProtoCleanupStub; NET_RegisterProtocolImplementation(&urn_proto_impl, URN_TYPE_URL); @@ -3380,6 +3381,7 @@ NET_InitNFSProtocol(void) nfs_proto_impl.init = net_NFSProtoLoad; nfs_proto_impl.process = net_NFSProtoStub; nfs_proto_impl.interrupt = net_NFSProtoStub; + nfs_proto_impl.resume = NULL; nfs_proto_impl.cleanup = net_NFSProtoCleanupStub; NET_RegisterProtocolImplementation(&nfs_proto_impl, NFS_TYPE_URL); @@ -3420,6 +3422,7 @@ NET_InitWAISProtocol(void) wais_proto_impl.init = net_WAISProtoLoad; wais_proto_impl.process = net_WAISProtoStub; wais_proto_impl.interrupt = net_WAISProtoStub; + wais_proto_impl.resume = NULL; wais_proto_impl.cleanup = net_WAISProtoCleanupStub; NET_RegisterProtocolImplementation(&wais_proto_impl, WAIS_TYPE_URL); diff --git a/network/module/nsStubContext.cpp b/network/module/nsStubContext.cpp index 296b73a2942..0c25d5f96b7 100644 --- a/network/module/nsStubContext.cpp +++ b/network/module/nsStubContext.cpp @@ -401,12 +401,16 @@ PRIVATE XP_Bool _stub_PromptUsernameAndPassword(MWContext *context, } PRIVATE -char *stub_PromptPassword(MWContext *context, - const char *msg) +char *_stub_PromptPassword(MWContext *context, + char *msg, + XP_Bool *remember, + XP_Bool is_secure, + void *closure) { nsINetSupport *ins; char *result = nsnull; +#ifndef XP_UNIX if (nsnull != (ins = getNetSupport(context->modular_data))) { nsAutoString str(msg); nsAutoString res; @@ -418,20 +422,36 @@ char *stub_PromptPassword(MWContext *context, } /* No nsINetSupport interface... */ - else { + else +#endif /* !XP_UNIX */ + { + NET_AuthClosure *auth_closure = (NET_AuthClosure *) closure; char buf[256]; printf("%s\n", msg); printf("%cPassword: ", '\007'); fgets(buf, sizeof buf, stdin); if (PL_strlen(buf)) { - result = PL_strdup(buf); + auth_closure->pass = PL_strdup(buf); + auth_closure->pass[strlen(buf)-1] = '\0'; + NET_ResumeWithAuth (closure); } } return result; } +extern "C" char * +stub_PromptPassword(MWContext *context, + char *msg, + XP_Bool *remember, + XP_Bool is_secure, + void * closure) +{ + return _stub_PromptPassword(context, msg, remember, + is_secure, closure); +} + extern "C" XP_Bool stub_PromptUsernameAndPassword(MWContext *context, const char *msg, diff --git a/network/protocol/about/mkabout.c b/network/protocol/about/mkabout.c index 217593ceef2..eabe13e9016 100644 --- a/network/protocol/about/mkabout.c +++ b/network/protocol/about/mkabout.c @@ -933,6 +933,7 @@ NET_InitAboutProtocol(void) about_proto_impl.init = net_AboutLoad; about_proto_impl.process = net_AboutStub; about_proto_impl.interrupt = net_AboutStub; + about_proto_impl.resume = NULL; about_proto_impl.cleanup = net_CleanupAbout; NET_RegisterProtocolImplementation(&about_proto_impl, ABOUT_TYPE_URL); diff --git a/network/protocol/certld/mkcertld.c b/network/protocol/certld/mkcertld.c index cd69fb67180..8c3612d6b4e 100644 --- a/network/protocol/certld/mkcertld.c +++ b/network/protocol/certld/mkcertld.c @@ -134,6 +134,7 @@ NET_InitCertLdapProtocol(void) certldap_proto_impl.init = net_CertLdapLoad; certldap_proto_impl.process = net_ProcessCertLdap; certldap_proto_impl.interrupt = net_InterruptCertLdap; + certldap_proto_impl.resume = NULL; certldap_proto_impl.cleanup = net_CleanupCertLdap; NET_RegisterProtocolImplementation(&certldap_proto_impl, INTERNAL_CERTLDAP_TYPE_URL); diff --git a/network/protocol/dataurl/mkdaturl.c b/network/protocol/dataurl/mkdaturl.c index aaa9cd4a1b7..bff508bb54d 100644 --- a/network/protocol/dataurl/mkdaturl.c +++ b/network/protocol/dataurl/mkdaturl.c @@ -156,6 +156,7 @@ NET_InitDataURLProtocol(void) dataurl_proto_impl.init = net_DataURLLoad; dataurl_proto_impl.process = net_ProcessDataURL; dataurl_proto_impl.interrupt = net_InterruptDataURL; + dataurl_proto_impl.resume = NULL; dataurl_proto_impl.cleanup = net_CleanupDataURL; NET_RegisterProtocolImplementation(&dataurl_proto_impl, DATA_TYPE_URL); diff --git a/network/protocol/file/mkfile.c b/network/protocol/file/mkfile.c index af6eb16a21a..2e7b062a18d 100644 --- a/network/protocol/file/mkfile.c +++ b/network/protocol/file/mkfile.c @@ -1851,6 +1851,7 @@ NET_InitFileProtocol(void) file_proto_impl.init = net_FileLoad; file_proto_impl.process = net_ProcessFile; file_proto_impl.interrupt = net_InterruptFile; + file_proto_impl.resume = NULL; file_proto_impl.cleanup = net_CleanupFile; NET_RegisterProtocolImplementation(&file_proto_impl, FILE_TYPE_URL); diff --git a/network/protocol/ftp/mkftp.c b/network/protocol/ftp/mkftp.c index 6ad4d4fbffa..4bdc9e40681 100644 --- a/network/protocol/ftp/mkftp.c +++ b/network/protocol/ftp/mkftp.c @@ -154,6 +154,7 @@ typedef struct _FTPConnection { */ typedef enum _FTPStates { FTP_WAIT_FOR_RESPONSE, +FTP_WAIT_FOR_AUTH, FTP_CONTROL_CONNECT, FTP_CONTROL_CONNECT_WAIT, FTP_SEND_USERNAME, @@ -291,6 +292,11 @@ typedef struct _FTPConData { /* forward decls */ static const char *pref_email_as_ftp_password = "security.email_as_ftp_password"; PRIVATE int32 net_ProcessFTP(ActiveEntry * ce); +PUBLIC PRBool stub_PromptPassword(MWContext *context, + char *prompt, + XP_Bool *remember, + XP_Bool is_secure, + void *closure); /* function prototypes */ @@ -3752,6 +3758,7 @@ net_parse_dir_entry (char *entry, int server_type) } /* net_parse_dir_entry */ + PRIVATE int net_get_ftp_password(ActiveEntry *ce) { @@ -3788,37 +3795,40 @@ net_get_ftp_password(ActiveEntry *ce) if(!cd->password) { + PRBool status; + NET_AuthClosure * auth_closure = PR_NEWZAP (NET_AuthClosure); + PR_snprintf(cd->output_buffer, OUTPUT_BUFFER_SIZE, XP_GetString(XP_PROMPT_ENTER_PASSWORD), host_string); -#if defined(SingleSignon) - cd->password = (char *)SI_PromptPassword(ce->window_id, - cd->output_buffer, host_string, - FALSE /* pickFirstUser */); -#else - cd->password = (char *)PC_PromptPassword(ce->window_id, - cd->output_buffer, &cd->store_password, - FALSE /* not secure */); -#endif - if(!cd->password) - { - PR_Free(host_string); - return(MK_INTERRUPTED); /* user canceled */ - } + + /* the new multi-threaded case -- we return asynchronously */ + if (!auth_closure) { + return(MK_INTERRUPTED); + } + + auth_closure->_private = (void *) ce; + auth_closure->user = NULL; + auth_closure->pass = NULL; + auth_closure->msg = PL_strdup (cd->output_buffer); + + status = stub_PromptPassword(ce->window_id, + cd->output_buffer, + &cd->store_password, + FALSE /* not secure */, + (void *) auth_closure); + + PR_Free(host_string); + /* this no longer a user cancel - password prompting is async */ + return(FTP_WAIT_FOR_AUTH); } - - StrAllocCopy(ftp_last_password_host, host_string); - StrAllocCopy(ftp_last_password, cd->password); } - - PR_Free(host_string); } - cd->next_state = FTP_SEND_PASSWORD; - return 0; } + PRIVATE int net_get_ftp_password_response(FTPConData *cd) { @@ -4160,6 +4170,30 @@ net_FTPLoad (ActiveEntry * ce) } +PUBLIC void +net_ResumeFTP(ActiveEntry *ce, NET_AuthClosure *auth_closure, PRBool resume) +{ + FTPConData * cd = (FTPConData *) ce->con_data; + + TRACEMSG (("net_ResumeFTP: %s", ce->URL_s->address)); + + if (resume) { + char * host_string = NET_ParseURL(ce->URL_s->address, (GET_USERNAME_PART | GET_HOST_PART) ); + + cd->password = PL_strdup (auth_closure->pass); + cd->next_state = FTP_SEND_PASSWORD; + + StrAllocCopy(ftp_last_password_host, host_string); + StrAllocCopy(ftp_last_password, cd->password); + + PR_Free (host_string); + } else { + cd->next_state = FTP_DONE; + } + + return; +} + /* the main state machine control routine. Calls * the individual state processors * @@ -4178,6 +4212,10 @@ net_ProcessFTP(ActiveEntry * ce) switch(cd->next_state) { + case FTP_WAIT_FOR_AUTH: + printf ("ProcessFTP: waiting for password\n"); + break; + case FTP_WAIT_FOR_RESPONSE: ce->status = net_ftp_response(ce); break; @@ -4835,6 +4873,7 @@ NET_InitFTPProtocol(void) ftp_proto_impl.init = net_FTPLoad; ftp_proto_impl.process = net_ProcessFTP; ftp_proto_impl.interrupt = net_InterruptFTP; + ftp_proto_impl.resume = net_ResumeFTP; ftp_proto_impl.cleanup = net_CleanupFTP; NET_RegisterProtocolImplementation(&ftp_proto_impl, FTP_TYPE_URL); diff --git a/network/protocol/gopher/mkgopher.c b/network/protocol/gopher/mkgopher.c index 4e658d52680..2bb4f3caeae 100644 --- a/network/protocol/gopher/mkgopher.c +++ b/network/protocol/gopher/mkgopher.c @@ -1169,6 +1169,7 @@ NET_InitGopherProtocol(void) gopher_proto_impl.init = net_GopherLoad; gopher_proto_impl.process = net_ProcessGopher; gopher_proto_impl.interrupt = net_InterruptGopher; + gopher_proto_impl.resume = NULL; gopher_proto_impl.cleanup = net_CleanupGopher; NET_RegisterProtocolImplementation(&gopher_proto_impl, GOPHER_TYPE_URL); diff --git a/network/protocol/http/mkhttp.c b/network/protocol/http/mkhttp.c index d2d84f0d07e..9e320a86c03 100644 --- a/network/protocol/http/mkhttp.c +++ b/network/protocol/http/mkhttp.c @@ -2646,15 +2646,22 @@ net_setup_http_stream(ActiveEntry * ce) { } PUBLIC void -NET_ResumeHTTP(ActiveEntry * ce, PRBool resume) +net_ResumeHTTP(ActiveEntry * ce, NET_AuthClosure *auth_closure, PRBool resume) { HTTPConData * cd = (HTTPConData *) ce->con_data; TRACEMSG (("NET_ResumeHTTP: %s", ce->URL_s->address)); - if (resume) + + if (resume) { + + /* now update the user/pass */ + ce->URL_s->username = PL_strdup (auth_closure->user); + ce->URL_s->password = PL_strdup (auth_closure->pass); cd->next_state = HTTP_SETUP_STREAM; - else + + } else { cd->next_state = HTTP_DONE; + } return; } @@ -3887,6 +3894,7 @@ NET_InitHTTPProtocol(void) http_proto_impl.init = net_HTTPLoad; http_proto_impl.process = net_ProcessHTTP; http_proto_impl.interrupt = net_InterruptHTTP; + http_proto_impl.resume = net_ResumeHTTP; http_proto_impl.cleanup = net_CleanupHTTP; StrAllocCopy(http_proto_impl.scheme, HTTP_SCHEME); diff --git a/network/protocol/imap4/mkimap4.cpp b/network/protocol/imap4/mkimap4.cpp index 3a1b37b8690..4f82d6d7da5 100644 --- a/network/protocol/imap4/mkimap4.cpp +++ b/network/protocol/imap4/mkimap4.cpp @@ -10283,6 +10283,7 @@ NET_InitIMAP4Protocol(void) imap4_proto_impl.init = NET_IMAP4Load; imap4_proto_impl.process = NET_ProcessIMAP4; imap4_proto_impl.interrupt = NET_InterruptIMAP4; + imap4_proto_impl.resume = NULL; imap4_proto_impl.cleanup = net_CleanupIMAP4; NET_RegisterProtocolImplementation(&imap4_proto_impl, IMAP_TYPE_URL); diff --git a/network/protocol/js/mkmocha.c b/network/protocol/js/mkmocha.c index aa6b1b17319..ed7ec89c321 100644 --- a/network/protocol/js/mkmocha.c +++ b/network/protocol/js/mkmocha.c @@ -744,6 +744,7 @@ NET_InitMochaProtocol(void) mocha_proto_impl.init = net_MochaLoad; mocha_proto_impl.process = net_ProcessMocha; mocha_proto_impl.interrupt = net_InterruptMocha; + mocha_proto_impl.resume = NULL; mocha_proto_impl.cleanup = net_CleanupMocha; NET_RegisterProtocolImplementation(&mocha_proto_impl, MOCHA_TYPE_URL); diff --git a/network/protocol/ldap/mkldap.cpp b/network/protocol/ldap/mkldap.cpp index 25d057a3a60..eaaa67b4ccf 100644 --- a/network/protocol/ldap/mkldap.cpp +++ b/network/protocol/ldap/mkldap.cpp @@ -3285,6 +3285,7 @@ NET_InitLDAPProtocol(void) ldap_proto_impl.init = net_LoadLdap; ldap_proto_impl.process = net_ProcessLdap; ldap_proto_impl.interrupt = net_InterruptLdap; + ldap_proto_impl.resume = NULL; ldap_proto_impl.cleanup = net_CleanupLdap; NET_RegisterProtocolImplementation(&ldap_proto_impl, LDAP_TYPE_URL); diff --git a/network/protocol/mailbox/mkmailbx.c b/network/protocol/mailbox/mkmailbx.c index 2f2bd502cf9..c751f7d3525 100644 --- a/network/protocol/mailbox/mkmailbx.c +++ b/network/protocol/mailbox/mkmailbx.c @@ -808,6 +808,7 @@ NET_InitMailboxProtocol(void) mailbox_proto_impl.init = net_MailboxLoad; mailbox_proto_impl.process = net_ProcessMailbox; mailbox_proto_impl.interrupt = net_InterruptMailbox; + mailbox_proto_impl.resume = NULL; mailbox_proto_impl.cleanup = net_CleanupMailbox; NET_RegisterProtocolImplementation(&mailbox_proto_impl, MAILBOX_TYPE_URL); @@ -867,6 +868,7 @@ NET_InitMsgSearchProtocol(void) msgsearch_proto_impl.init = net_MsgSearchLoad; msgsearch_proto_impl.process = net_ProcessMsgSearch; msgsearch_proto_impl.interrupt = net_InterruptMsgSearch; + msgsearch_proto_impl.resume = NULL; msgsearch_proto_impl.cleanup = net_CleanupMsgSearch; NET_RegisterProtocolImplementation(&msgsearch_proto_impl, MSG_SEARCH_TYPE_URL); diff --git a/network/protocol/pop3/mkpop3.c b/network/protocol/pop3/mkpop3.c index cfa4f482283..6375f9ebeef 100644 --- a/network/protocol/pop3/mkpop3.c +++ b/network/protocol/pop3/mkpop3.c @@ -3259,6 +3259,7 @@ NET_InitPop3Protocol(void) pop3_proto_impl.init = net_Pop3Load; pop3_proto_impl.process = net_ProcessPop3; pop3_proto_impl.interrupt = net_InterruptPop3; + pop3_proto_impl.resume = NULL; pop3_proto_impl.cleanup = net_CleanupPop3; NET_RegisterProtocolImplementation(&pop3_proto_impl, POP3_TYPE_URL); NET_InitMailboxProtocol(); @@ -3863,6 +3864,7 @@ NET_InitMailboxProtocol(void) mbox_proto_impl.init = net_MBoxLoad; mbox_proto_impl.process = net_ProcessMBox; mbox_proto_impl.interrupt = net_InterruptMBox; + mbox_proto_impl.resume = NULL; mbox_proto_impl.cleanup = net_CleanupMBox; NET_RegisterProtocolImplementation(&mbox_proto_impl, MAILBOX_TYPE_URL); } diff --git a/network/protocol/remote/mkremote.c b/network/protocol/remote/mkremote.c index ecb3bbde7ef..c6a3af40049 100644 --- a/network/protocol/remote/mkremote.c +++ b/network/protocol/remote/mkremote.c @@ -172,6 +172,7 @@ NET_InitRemoteProtocol(void) remote_proto_impl.init = NET_RemoteHostLoad; remote_proto_impl.process = net_ProcessRemote; remote_proto_impl.interrupt = net_InterruptRemote; + remote_proto_impl.resume = NULL; remote_proto_impl.cleanup = net_CleanupRemote; NET_RegisterProtocolImplementation(&remote_proto_impl, RLOGIN_TYPE_URL); diff --git a/network/protocol/smtp/mksmtp.c b/network/protocol/smtp/mksmtp.c index 07f5c90a380..dc8bf2b8e7c 100644 --- a/network/protocol/smtp/mksmtp.c +++ b/network/protocol/smtp/mksmtp.c @@ -1614,6 +1614,7 @@ NET_InitMailtoProtocol(void) mailto_proto_impl.init = net_MailtoLoad; mailto_proto_impl.process = net_ProcessMailto; mailto_proto_impl.interrupt = net_InterruptMailto; + mailto_proto_impl.resume = NULL; mailto_proto_impl.cleanup = net_CleanupMailto; NET_RegisterProtocolImplementation(&mailto_proto_impl, MAILTO_TYPE_URL); diff --git a/network/protocol/sockstub/sockstub.cpp b/network/protocol/sockstub/sockstub.cpp index 19bf0c8b27b..747cb0dd1fb 100644 --- a/network/protocol/sockstub/sockstub.cpp +++ b/network/protocol/sockstub/sockstub.cpp @@ -640,6 +640,7 @@ NET_InitSockStubProtocol(void) sockstub_proto_impl.init = net_LoadSockStub; sockstub_proto_impl.process = net_ProcessSockStub; sockstub_proto_impl.interrupt = net_InterruptSockStub; + sockstub_proto_impl.resume = NULL; sockstub_proto_impl.cleanup = net_CleanupSockStub; StrAllocCopy(sockstub_proto_impl.scheme, SOCKSTUB_SCHEME);