]> git.pld-linux.org Git - packages/slrn.git/blob - slrn-user-agent.patch
016f32944f98bfb6bb96353c615fc00da51f4665
[packages/slrn.git] / slrn-user-agent.patch
1 diff -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
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);
9 --- slrn-1.0.2/macros/INSTFILES.orig    2016-06-26 20:26:17.435600753 +0200
10 +++ slrn-1.0.2/macros/INSTFILES 2016-06-26 20:27:20.788590874 +0200
11 @@ -15,3 +15,4 @@
12  xcomment.sl
13  mime.sl
14  mailcap.sl
15 +uname.sl
16 diff -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
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  
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;
36  
37 +   if (Slrn_User_Info.system_type != NULL)
38 +     system_os_name = Slrn_User_Info.system_type;
39 +   else
40     system_os_name = slrn_get_os_name ();
41 +   if (Slrn_User_Info.user_agent != NULL)
42 +     User_Agent = Slrn_User_Info.user_agent;
43 +   else
44 +     User_Agent = "slrn";
45  
46  #if SLRN_HAS_STRICT_FROM
47     if (NULL != (tmp = slrn_make_from_string ()))
48 @@ -825,7 +832,7 @@
49  
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},
63 +     {"user_agent", &Slrn_User_Info.user_agent},
64 +     {"system_type", &Slrn_User_Info.system_type},
65  #if SLRN_HAS_GROUPLENS
66       {"grouplens_pseudoname", &Slrn_GroupLens_Pseudoname, NULL},
67       {"grouplens_host", &Slrn_GroupLens_Host, NULL},
This page took 0.130991 seconds and 2 git commands to generate.