autoloading fix
authorChristian Thaeter <ct@pipapo.org>
Thu, 8 Nov 2007 07:19:17 +0000 (08:19 +0100)
committerChristian Thaeter <ct@pipapo.org>
Thu, 8 Nov 2007 07:19:17 +0000 (08:19 +0100)
src/rxpd_connection.c
src/rxpd_connection_cmd.c

index aa12f55..1cc8881 100644 (file)
@@ -210,7 +210,10 @@ rxpd_connection_parse_cmd (void* ptr)
               rxpd_buffer_printf (&self->out, "#ERROR: illegal filename\n");
               goto end;
             }
-          rxpd_file_load (self->file);
+          if (rxpd_file_load (self->file))
+            rxpd_log (base, LOG_INFO, "autoloaded '%s'\n", &line[i->sz]);
+          else
+            rxpd_log (base, LOG_WARNING, "could not autoload '%s'\n", &line[i->sz]);
         }
     }
 
index bc95510..f250202 100644 (file)
@@ -68,12 +68,15 @@ rxpd_connection_do_CHECK (struct rxpd_connection* self, char* line, struct rxpd_
                   if (!subfile)
                     {
                       subfile = rxpd_file_new (base, subname);
-                      if (subfile)
+                      if (!subfile)
                         {
                           rxpd_buffer_printf (&self->out, "#ERROR: illegal filename\n");
                           break;
                         }
-                      rxpd_file_load (self->file);
+                      if (rxpd_file_load (subfile))
+                        rxpd_log (base, LOG_INFO, "autoloaded '%s'\n", subname);
+                      else
+                        rxpd_log (base, LOG_WARNING, "could not autoload '%s'\n", subname);
                     }
 
                   rxpd_log (base, LOG_DEBUG, "going to sublist '%s'\n", subname);