]> git.pld-linux.org Git - packages/slrn.git/blame - slrn-user-agent.patch
- updated for 0.9.9-pre122
[packages/slrn.git] / slrn-user-agent.patch
CommitLineData
8741f94d
JB
1diff -Nur slrn-0.9.8.0.orig/macros/uname.sl slrn-0.9.8.0/macros/uname.sl
2--- slrn-0.9.8.0.orig/macros/uname.sl 1970-01-01 01:00:00.000000000 +0100
3+++ slrn-0.9.8.0/macros/uname.sl 2003-08-26 20:30:42.442283944 +0200
1a161ab5
JB
4@@ -0,0 +1,4 @@
5+% example of customizing User-Agent header
6+
7+set_string_variable("system_type", uname().sysname + " " + uname().release
8+ + "/" + uname().machine);
3591afbc
JB
9--- slrn/macros/INSTFILES.orig 2007-11-10 06:07:20.000000000 +0100
10+++ slrn/macros/INSTFILES 2008-07-25 20:24:46.864745949 +0200
11@@ -13,3 +13,4 @@
12 util.sl
13 varset.sl
14 xcomment.sl
15+uname.sl
8741f94d
JB
16diff -Nur slrn-0.9.8.0.orig/src/misc.h slrn-0.9.8.0/src/misc.h
17--- slrn-0.9.8.0.orig/src/misc.h 2002-10-06 00:19:51.000000000 +0200
18+++ slrn-0.9.8.0/src/misc.h 2003-08-26 20:30:42.443283792 +0200
19@@ -81,6 +81,8 @@
20 #endif
1a161ab5
JB
21 char *posting_host; /* FQDN or NULL */
22 char *login_name;
23+ char *user_agent;
24+ char *system_type;
25 }
26 Slrn_User_Info_Type;
27
3591afbc
JB
28--- slrn/src/post.c.orig 2008-07-11 07:54:20.000000000 +0200
29+++ slrn/src/post.c 2008-07-25 20:25:59.896750139 +0200
30@@ -666,9 +666,16 @@
31 int newsgroups_found=0, subject_found=0, followupto_found=0;
32 Slrn_Mime_Error_Obj *err=NULL;
33 Slrn_Mime_Error_Obj *mime_err;
34- char *tmp, *system_os_name;
35+ char *tmp, *system_os_name, *User_Agent;
bbe6f716 36
bbe6f716
JB
37+ if (Slrn_User_Info.system_type != NULL)
38+ system_os_name = Slrn_User_Info.system_type;
39+ else
3591afbc 40 system_os_name = slrn_get_os_name ();
bbe6f716
JB
41+ if (Slrn_User_Info.user_agent != NULL)
42+ User_Agent = Slrn_User_Info.user_agent;
43+ else
44+ User_Agent = "slrn";
45
3591afbc
JB
46 #if SLRN_HAS_STRICT_FROM
47 if (NULL != (tmp = slrn_make_from_string ()))
48@@ -825,7 +832,7 @@
bbe6f716 49
3591afbc
JB
50 if ((NULL == (tmp = slrn_gen_date_header ()))
51 || (NULL == slrn_append_to_header (a, tmp, 1))
52- || (NULL == (tmp = slrn_strdup_printf("User-Agent: slrn/%s (%s)", Slrn_Version_String, system_os_name)))
53+ || (NULL == (tmp = slrn_strdup_printf("User-Agent: %s/%s (%s)", User_Agent, Slrn_Version_String, system_os_name)))
54 || (NULL == slrn_append_to_header (a, tmp, 1))
55 || (NULL == slrn_append_to_header (a, NULL,0))) /* separator */
56 {
57--- slrn/src/startup.c.orig 2008-07-10 07:15:22.000000000 +0200
58+++ slrn/src/startup.c 2008-07-25 20:26:23.960750978 +0200
59@@ -756,6 +756,8 @@
60 {"followup_custom_headers", &Slrn_Followup_Custom_Headers, NULL},
61 {"reply_custom_headers", &Slrn_Reply_Custom_Headers, NULL},
62 {"supersedes_custom_headers", &Slrn_Supersedes_Custom_Headers, NULL},
1a161ab5
JB
63+ {"user_agent", &Slrn_User_Info.user_agent},
64+ {"system_type", &Slrn_User_Info.system_type},
65 #if SLRN_HAS_GROUPLENS
3591afbc
JB
66 {"grouplens_pseudoname", &Slrn_GroupLens_Pseudoname, NULL},
67 {"grouplens_host", &Slrn_GroupLens_Host, NULL},
This page took 0.084504 seconds and 4 git commands to generate.