summaryrefslogtreecommitdiff
path: root/www/plugger/files/patch-plugger.c
blob: 93674e685f60be4d671cb61fb94589347d291111 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- plugger.c.orig	2004-08-04 20:03:29.000000000 +0200
+++ plugger.c	2011-12-20 20:23:39.068175279 +0100
@@ -624,16 +624,6 @@
   if(cb(fname, data)) return 1;
 #endif
 
-  sprintf(fname,"/usr/local/netscape/%s",basename);
-  if(cb(fname, data)) return 1;
-  sprintf(fname,"/etc/%s",basename);
-  if(cb(fname, data)) return 1;
-  sprintf(fname,"/usr/etc/%s",basename);
-  if(cb(fname, data)) return 1;
-  sprintf(fname,"/usr/local/etc/%s",basename);
-  if(cb(fname, data)) return 1;
-  if(cb(basename, data)) return 1;
-  
   return 0;
 }
 
@@ -1060,17 +1050,17 @@
 
   D("start_standalone!\n");
 
-  if(!THIS->command) { D("no command!\n"); return; }
-  if(!WINDOW) { D("No window!\n"); return; }
+  if(!THIS->command) { D("no command!\n"); return NPERR_GENERIC_ERROR; }
+  if(!WINDOW) { D("No window!\n"); return NPERR_GENERIC_ERROR; }
 
   if(THIS->flags & H_URL)
   {
-    if(!THIS->url) { D("No url!\n"); return; }
+    if(!THIS->url) { D("No url!\n"); return NPERR_GENERIC_ERROR; }
   }else{
-    if(!THIS->stream) { D("No stream!\n"); return; }
+    if(!THIS->stream) { D("No stream!\n"); return NPERR_GENERIC_ERROR; }
   }
 
-  if(THIS->waitfd!=-1) { D("Already started!\n"); return; }
+  if(THIS->waitfd!=-1) { D("Already started!\n"); return NPERR_GENERIC_ERROR; }
   D("Actually starging!\n");
 
   if(socketpair(AF_UNIX, SOCK_STREAM, 0, bar) < 0)
@@ -1082,7 +1072,7 @@
   if(THIS->pid1==-1)
   {
     NPN_Status(instance, "My_Fork failed!");
-    return;
+    return NPERR_GENERIC_ERROR;
   }
   
   if(!THIS->pid1)
@@ -1097,6 +1087,7 @@
     THIS->waitfd=bar[0];
     close(bar[1]);
   }
+  return NPERR_NO_ERROR;
 }