diff http.c @ 6156:85710c0ef275 libavformat

HTTP: Add a method for initializing the authentication state from another connection
author mstorsjo
date Mon, 21 Jun 2010 19:40:30 +0000
parents a7094b61b3fb
children 4c0017a87855
line wrap: on
line diff
--- a/http.c	Mon Jun 21 19:02:35 2010 +0000
+++ b/http.c	Mon Jun 21 19:40:30 2010 +0000
@@ -69,6 +69,12 @@
     ((HTTPContext*)h->priv_data)->chunksize = is_chunked ? 0 : -1;
 }
 
+void ff_http_init_auth_state(URLContext *dest, const URLContext *src)
+{
+    memcpy(&((HTTPContext*)dest->priv_data)->auth_state,
+           &((HTTPContext*)src->priv_data)->auth_state, sizeof(HTTPAuthState));
+}
+
 /* return non zero if error */
 static int http_open_cnx(URLContext *h)
 {