]> git.sesse.net Git - vlc/commitdiff
Don't get stuck in Connect() when module is in Open() function, when it is being...
authorJean-Paul Saman <jpsaman@videolan.org>
Wed, 20 Feb 2008 14:39:57 +0000 (14:39 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Wed, 20 Feb 2008 14:39:57 +0000 (14:39 +0000)
modules/access/http.c

index 9dde912893606cd8606c5dd9599ccb0e4e14af48..c669400e4c61edaa7bf4ca9b6483787223dc1f26 100644 (file)
@@ -953,6 +953,12 @@ static int Connect( access_t *p_access, int64_t i_tell )
                     i_status = 0;
 
                 free( psz );
+
+                if( p_access->b_die || p_access->b_error )
+                {
+                    Disconnect( p_access );
+                    return -1;
+                }
             }
             while( i_status );
         }
@@ -1171,6 +1177,12 @@ static int Request( access_t *p_access, int64_t i_tell )
             goto error;
         }
 
+        if( p_access->b_die || p_access->b_error )
+        {
+            free( psz );
+            goto error;
+        }
+
         /* msg_Dbg( p_input, "Line=%s", psz ); */
         if( *psz == '\0' )
         {
@@ -1178,7 +1190,6 @@ static int Request( access_t *p_access, int64_t i_tell )
             break;
         }
 
-
         if( ( p = strchr( psz, ':' ) ) == NULL )
         {
             msg_Err( p_access, "malformed header line: %s", psz );