Ticket #1976: remove_hardcoded_server_url.patch

File remove_hardcoded_server_url.patch, 1.2 KB (added by timClicks, 10 years ago)

untested fix

  • src/jarabe/desktop/schoolserver.py

    diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py
    index fc9ddeb..6a59cb2 100644
    a b import gconf 
    2929from sugar import env
    3030from sugar.profile import get_profile
    3131
    32 REGISTER_URL = 'http://schoolserver:8080/'
     32REGISTER_URL = ''
     33# this setting is depreciated, consider changing XMPP settings
     34# in /desktop/sugar/collaboration/jabber_server
    3335
    3436def generate_serial_number():
    3537    """  Generates a serial number based on 3 random uppercase letters
    def register_laptop(url=REGISTER_URL): 
    8991    else:
    9092        sn = generate_serial_number()
    9193        uuid_ = str(uuid.uuid1())
    92         setting_name = '/desktop/sugar/collaboration/jabber_server'
    93         jabber_server = client.get_string(setting_name)
    94         store_identifiers(sn, uuid_, jabber_server)
     94
     95    setting_name = '/desktop/sugar/collaboration/jabber_server'
     96    jabber_server = client.get_string(setting_name)
     97    store_identifiers(sn, uuid_, jabber_server)
     98    if len(url) == 0:
    9599        url = 'http://' + jabber_server + ':8080/'
     100    else:
     101        url = url
    96102
    97103    nick = client.get_string('/desktop/sugar/user/nick')
    98104