version 1.5, 2025/03/24 04:13:11
|
version 1.6, 2025/04/13 04:22:43
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* Revision 1.6 2025/04/13 04:22:43 snw |
|
* Fix snprintf calls |
|
* |
* Revision 1.5 2025/03/24 04:13:11 snw |
* Revision 1.5 2025/03/24 04:13:11 snw |
* Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 |
* Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 |
* |
* |
Line 77 void ssvn_zprocess (short action, char *
|
Line 80 void ssvn_zprocess (short action, char *
|
} |
} |
|
|
t_pid = atol(ref->subscripts[0]); |
t_pid = atol(ref->subscripts[0]); |
snprintf (proc_path, PATHLEN, "/proc/%d", t_pid); |
snprintf (proc_path, PATHLEN - 1, "/proc/%d", t_pid); |
|
|
strncpy (verb, ref->subscripts[1], STRLEN); |
strncpy (verb, ref->subscripts[1], STRLEN); |
|
|
Line 91 void ssvn_zprocess (short action, char *
|
Line 94 void ssvn_zprocess (short action, char *
|
if (strcmp (verb, "EXISTS") == 0) { |
if (strcmp (verb, "EXISTS") == 0) { |
|
|
if (kill (t_pid, 0) == 0) { |
if (kill (t_pid, 0) == 0) { |
snprintf (data, STRLEN, "%d\201", 1); |
snprintf (data, STRLEN - 1, "%d\201", 1); |
} |
} |
else { |
else { |
snprintf (data, STRLEN, "%d\201", 0); |
snprintf (data, STRLEN - 1, "%d\201", 0); |
} |
} |
|
|
free (kbuf); |
free (kbuf); |
Line 115 void ssvn_zprocess (short action, char *
|
Line 118 void ssvn_zprocess (short action, char *
|
|
|
strncpy (attrib, ref->subscripts[2], 255); |
strncpy (attrib, ref->subscripts[2], 255); |
|
|
snprintf (fpath, PATHLEN, "/proc/%d/%s", t_pid, attrib); |
snprintf (fpath, PATHLEN - 1, "/proc/%d/%s", t_pid, attrib); |
|
|
if ((fp = fopen (fpath, "r")) == NULL) { |
if ((fp = fopen (fpath, "r")) == NULL) { |
|
|