svnno****@sourc*****
svnno****@sourc*****
Sat Mar 24 15:42:06 JST 2007
Revision: 2991 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=2991 Author: ikezoe Date: 2007-03-24 15:42:06 +0900 (Sat, 24 Mar 2007) Log Message: ----------- cleaning. Modified Paths: -------------- kazehakase/trunk/src/net/kz-http.c Modified: kazehakase/trunk/src/net/kz-http.c =================================================================== --- kazehakase/trunk/src/net/kz-http.c 2007-03-24 06:24:05 UTC (rev 2990) +++ kazehakase/trunk/src/net/kz-http.c 2007-03-24 06:42:06 UTC (rev 2991) @@ -823,7 +823,7 @@ else if (g_ascii_strncasecmp(buffer, "Content-Length:", 15) == 0) { guint size = (guint)strtol(buffer + 15, NULL, 10); - g_object_set(G_OBJECT(KZ_IO(http)), + g_object_set(G_OBJECT(http), "file_size", size, NULL); } else if (g_ascii_strncasecmp(buffer, "Transfer-Encoding:", 18) == 0) @@ -860,7 +860,7 @@ struct tm t; strptime(buffer + 15, " %a, %d %b %Y %H:%M:%S %z", &t); - g_object_set(G_OBJECT(KZ_IO(http)), + g_object_set(G_OBJECT(http), "last_modified", (guint)mktime(&t), NULL); } else if (g_ascii_strncasecmp(buffer, "WWW-Authenticate:", 17) == 0) @@ -1225,13 +1225,11 @@ gboolean exist, use_proxy; gchar *http_host = NULL; guint http_port; - KzHTTP *http; KzProxyItem *item = NULL; KzHTTPPrivate *priv; g_return_if_fail(KZ_IS_HTTP(io)); - http = KZ_HTTP(io); - priv = KZ_HTTP_GET_PRIVATE (http); + priv = KZ_HTTP_GET_PRIVATE (io); priv->chunked = FALSE; priv->header = TRUE; @@ -1280,7 +1278,7 @@ /* There is a valid proxy setting, so connect with this proxy*/ priv->use_proxy = TRUE; gnet_tcp_socket_connect_async(item->http_host, item->http_port, - cb_http_connect, http); + cb_http_connect, io); g_object_unref(G_OBJECT(item)); return; @@ -1289,7 +1287,7 @@ http_host = priv->hostname; http_port = priv->port; gnet_tcp_socket_connect_async(http_host, http_port, - cb_http_connect, http); + cb_http_connect, io); return; }